<?php /* Template_ 2.2.4 2011/05/24 13:33:36 E:\php\www\sagapo\_DATA\template_\default\admin\member\add.html 000004254 */ ?>
<h2 class="member">회원 관리</h2>
<section class="default">
	<script>
		$(function() {		
			$("#member_add").validate({
				rules: {
					 mem_id : {required:true, userid:true}
					,mem_pwd : {required:true, password:true}
					,mem_pwd_confirm : {required:true, password:true, equalTo:"#mem_pwd"}
					,mem_name : "required"
					,mem_email : {required:true, email:true}
				}
			});
			
			$("#mem_sign").cleditor()[0].focus();
			
			$("#mem_id_overlap").click(function() {
				mid = $("#mem_id");
				
				if(mid.valid()) {
					url = "<?php echo $TPL_VAR["CFG"]->PATH->WWW?>/member/getMID/"+mid.val();
					$.ajax({url:url, success:function(data){
						if(mesg.success == data.code) {
							if(confirm(data.msg)) {
								$("#mem_id2").val(mid.val());
							} else {
								mid.val("").focus();	
							}
						} else {
							alert(data.msg);
							mid.val("").focus();
						}
					}});
				} else {
					mid.focus();
				}
				return false;
			});
			
			$("#mem_id").focus();
		});
	</script>
	<form name="member_add" id="member_add" action="<?php echo $TPL_VAR["CFG"]->PATH->WWWADMIN?>/member/doAdd" method="post">
		<table class="table">
			<caption>
				회원 추가
			</caption>
			<colgroup>
				<col class="t_add" />
				<col />
			</colgroup>
			<tbody>
				<tr>
					<th scope="row" class="txt_right br"><label for="mem_id">아이디</label></th>
					<td>
						<input type="text" name="mem_id" id="mem_id" placeholder="아이디" class="width_30" />
						<input type="hidden" name="mem_id2" id="mem_id2" placeholder="아이디 중복확인 체크" class="required" />
						<button type="button" class="accept" id="mem_id_overlap">중복확인</button>
					</td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="mem_pwd">비밀번호</label></th>
					<td>
						<input type="password" name="mem_pwd" id="mem_pwd" placeholder="비밀번호" class="width_50" />
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="mem_pwd_confirm">비밀번호 확인</label></th>
					<td>
						<input type="password" name="mem_pwd_confirm" id="mem_pwd_confirm" placeholder="비밀번호 확인" class="width_50" />
					</td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="mem_name">이름</label></th>
					<td>
						<input type="text" name="mem_name" id="mem_name" placeholder="이름" />
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="mem_email">이메일</label></th>
					<td>
						<input type="email" name="mem_email" id="mem_email" placeholder="email" class="width_60" />
					</td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="mem_sendemail_0">이메일 수신</label></th>
					<td>
						<input type="radio" name="mem_sendemail" id="mem_sendemail_0" value="1" checked="checked" /><label for="mem_sendemail_0"> 수신</label>
						<input type="radio" name="mem_sendemail" id="mem_sendemail_1" value="0" /><label for="mem_sendemail_1"> 미수신</label>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br"><label for="mem_auth_0">인증</label></th>
					<td>
						<input type="radio" name="mem_auth" id="mem_auth_0" value="1" checked="checked" /><label for="mem_auth_0"> 인증</label>
						<input type="radio" name="mem_auth" id="mem_auth_1" value="0" /><label for="mem_auth_1"> 미인증</label>
					</td>
				</tr>
				<tr class="odd">
					<th scope="row" class="txt_right br"><label for="mem_sign">서명</label></th>
					<td>
						<textarea name="mem_sign" id="mem_sign" class="width_90" placeholder="서명"></textarea>
					</td>
				</tr>
				<tr>
					<th scope="row" class="txt_right br">사진</th>
					<td>
						&nbsp; 사진은 나중에
					</td>
				</tr>
			</tbody>
		</table>
		
		<div class="button_area">
			<button type="submit">전송</button>
			<button type="button" class="cancel" onclick="back()">뒤로</button>
		</div>
	</form>
</section>